﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="TCM.Workflows.AgendaOnCreating"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:local="clr-namespace:TCM"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="eEntity" Type="InArgument(local:Course)" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>TCM.Workflows.AgendaOnCreating_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
      <x:String>TCM</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>Antlr3.Runtime</AssemblyReference>
      <AssemblyReference>DayPilot.Web.Mvc</AssemblyReference>
      <AssemblyReference>DayPilotCalendarMvc3</AssemblyReference>
      <AssemblyReference>DotNetOpenAuth.AspNet</AssemblyReference>
      <AssemblyReference>DotNetOpenAuth.Core</AssemblyReference>
      <AssemblyReference>DotNetOpenAuth.OAuth</AssemblyReference>
      <AssemblyReference>DotNetOpenAuth.OAuth.Consumer</AssemblyReference>
      <AssemblyReference>DotNetOpenAuth.OpenId</AssemblyReference>
      <AssemblyReference>DotNetOpenAuth.OpenId.RelyingParty</AssemblyReference>
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>Microsoft.Data.Edm</AssemblyReference>
      <AssemblyReference>Microsoft.Data.OData</AssemblyReference>
      <AssemblyReference>Microsoft.Web.Mvc.FixedDisplayModes</AssemblyReference>
      <AssemblyReference>Newtonsoft.Json</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Data.Entity</AssemblyReference>
      <AssemblyReference>System.Drawing</AssemblyReference>
      <AssemblyReference>System.Runtime.Serialization</AssemblyReference>
      <AssemblyReference>System.Security</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Channels</AssemblyReference>
      <AssemblyReference>System.Spatial</AssemblyReference>
      <AssemblyReference>System.Web.DynamicData</AssemblyReference>
      <AssemblyReference>System.Web.Entity</AssemblyReference>
      <AssemblyReference>System.Web.ApplicationServices</AssemblyReference>
      <AssemblyReference>System.ComponentModel.DataAnnotations</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
      <AssemblyReference>System.Web.Http.OData</AssemblyReference>
      <AssemblyReference>System.Web.Razor</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>System.Web</AssemblyReference>
      <AssemblyReference>System.Web.Extensions</AssemblyReference>
      <AssemblyReference>System.Web.Abstractions</AssemblyReference>
      <AssemblyReference>System.Web.Routing</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Configuration</AssemblyReference>
      <AssemblyReference>System.Transactions</AssemblyReference>
      <AssemblyReference>System.Web.Services</AssemblyReference>
      <AssemblyReference>System.EnterpriseServices</AssemblyReference>
      <AssemblyReference>EntityFramework</AssemblyReference>
      <AssemblyReference>Microsoft.Web.Infrastructure</AssemblyReference>
      <AssemblyReference>System.Net.Http</AssemblyReference>
      <AssemblyReference>System.Net.Http.Formatting</AssemblyReference>
      <AssemblyReference>System.Net.Http.WebRequest</AssemblyReference>
      <AssemblyReference>System.Web.Helpers</AssemblyReference>
      <AssemblyReference>System.Web.Http</AssemblyReference>
      <AssemblyReference>System.Web.Http.WebHost</AssemblyReference>
      <AssemblyReference>System.Web.Mvc</AssemblyReference>
      <AssemblyReference>System.Web.Optimization</AssemblyReference>
      <AssemblyReference>System.Web.WebPages</AssemblyReference>
      <AssemblyReference>System.Web.WebPages.Deployment</AssemblyReference>
      <AssemblyReference>System.Web.WebPages.Razor</AssemblyReference>
      <AssemblyReference>WebGrease</AssemblyReference>
      <AssemblyReference>WebMatrix.Data</AssemblyReference>
      <AssemblyReference>Microsoft.Web.WebPages.OAuth</AssemblyReference>
      <AssemblyReference>WebMatrix.WebData</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>_TCM</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Flowchart sap2010:WorkflowViewState.IdRef="Flowchart_1">
    <Flowchart.Variables>
      <Variable x:TypeArguments="s:DateTime" Name="_Date" />
    </Flowchart.Variables>
    <Flowchart.StartNode>
      <FlowStep x:Name="__ReferenceID0" sap2010:WorkflowViewState.IdRef="FlowStep_2">
        <WriteLine sap2010:WorkflowViewState.IdRef="WriteLine_2" Text="Starting" />
        <FlowStep.Next>
          <FlowStep x:Name="__ReferenceID2" sap2010:WorkflowViewState.IdRef="FlowStep_4">
            <Assign sap2010:WorkflowViewState.IdRef="Assign_1">
              <Assign.To>
                <OutArgument x:TypeArguments="s:DateTime">
                  <mca:CSharpReference x:TypeArguments="s:DateTime">_Date</mca:CSharpReference>
                </OutArgument>
              </Assign.To>
              <Assign.Value>
                <InArgument x:TypeArguments="s:DateTime">
                  <mca:CSharpValue x:TypeArguments="s:DateTime">eEntity.StartDate.Value</mca:CSharpValue>
                </InArgument>
              </Assign.Value>
            </Assign>
            <FlowStep.Next>
              <FlowStep x:Name="__ReferenceID1" sap2010:WorkflowViewState.IdRef="FlowStep_3">
                <DoWhile DisplayName="Loop on dates" sap2010:WorkflowViewState.IdRef="DoWhile_1">
                  <DoWhile.Variables>
                    <Variable x:TypeArguments="x:String" Name="_DayOfWeek" />
                  </DoWhile.Variables>
                  <DoWhile.Condition>
                    <mca:CSharpValue x:TypeArguments="x:Boolean">_Date &lt;= eEntity.EndDate</mca:CSharpValue>
                  </DoWhile.Condition>
                  <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
                    <Sequence.Variables>
                      <Variable x:TypeArguments="s:DateTime" Name="_AgendaDTFrom" />
                      <Variable x:TypeArguments="s:DateTime" Name="_AgendaDTTo" />
                    </Sequence.Variables>
                    <Assign DisplayName="Get DayOfWeek" sap2010:WorkflowViewState.IdRef="Assign_3">
                      <Assign.To>
                        <OutArgument x:TypeArguments="x:String">
                          <mca:CSharpReference x:TypeArguments="x:String">_DayOfWeek</mca:CSharpReference>
                        </OutArgument>
                      </Assign.To>
                      <Assign.Value>
                        <InArgument x:TypeArguments="x:String">
                          <mca:CSharpValue x:TypeArguments="x:String">_Date.DayOfWeek.ToString()</mca:CSharpValue>
                        </InArgument>
                      </Assign.Value>
                    </Assign>
                    <ForEach x:TypeArguments="local:CourseSchedule" DisplayName="Loop For schedule course" sap2010:WorkflowViewState.IdRef="ForEach`1_1">
                      <ForEach.Values>
                        <InArgument x:TypeArguments="scg:IEnumerable(local:CourseSchedule)">
                          <mca:CSharpValue x:TypeArguments="scg:IEnumerable(local:CourseSchedule)">eEntity.CourseSchedules</mca:CSharpValue>
                        </InArgument>
                      </ForEach.Values>
                      <ActivityAction x:TypeArguments="local:CourseSchedule">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="local:CourseSchedule" Name="item" />
                        </ActivityAction.Argument>
                        <If sap2010:WorkflowViewState.IdRef="If_1">
                          <If.Condition>
                            <InArgument x:TypeArguments="x:Boolean">
                              <mca:CSharpValue x:TypeArguments="x:Boolean">_DayOfWeek == item.DayName</mca:CSharpValue>
                            </InArgument>
                          </If.Condition>
                          <If.Then>
                            <Sequence sap2010:WorkflowViewState.IdRef="Sequence_2">
                              <Sequence.Variables>
                                <Variable x:TypeArguments="x:String" Name="_AgendaTime" />
                              </Sequence.Variables>
                              <Assign sap2010:WorkflowViewState.IdRef="Assign_5">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="x:String">
                                    <mca:CSharpReference x:TypeArguments="x:String">_AgendaTime</mca:CSharpReference>
                                  </OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="x:String">
                                    <mca:CSharpValue x:TypeArguments="x:String">item.FromTimeOnly</mca:CSharpValue>
                                  </InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign sap2010:WorkflowViewState.IdRef="Assign_4">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="s:DateTime">
                                    <mca:CSharpReference x:TypeArguments="s:DateTime">_AgendaDTFrom</mca:CSharpReference>
                                  </OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="s:DateTime">
                                    <mca:CSharpValue x:TypeArguments="s:DateTime">Convert.ToDateTime( _Date.Date.ToShortDateString () + " " + _AgendaTime )</mca:CSharpValue>
                                  </InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign sap2010:WorkflowViewState.IdRef="Assign_6">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="x:String">
                                    <mca:CSharpReference x:TypeArguments="x:String">_AgendaTime</mca:CSharpReference>
                                  </OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="x:String">
                                    <mca:CSharpValue x:TypeArguments="x:String">item.ToTimeOnly</mca:CSharpValue>
                                  </InArgument>
                                </Assign.Value>
                              </Assign>
                              <Assign sap2010:WorkflowViewState.IdRef="Assign_7">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="s:DateTime">
                                    <mca:CSharpReference x:TypeArguments="s:DateTime">_AgendaDTTo</mca:CSharpReference>
                                  </OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="s:DateTime">
                                    <mca:CSharpValue x:TypeArguments="s:DateTime">Convert.ToDateTime(_Date.Date.ToShortDateString() + " " + _AgendaTime)</mca:CSharpValue>
                                  </InArgument>
                                </Assign.Value>
                              </Assign>
                              <AddToCollection x:TypeArguments="local:Agenda" DisplayName="Add Agenda" sap2010:WorkflowViewState.IdRef="AddToCollection`1_1">
                                <AddToCollection.Item>
                                  <InArgument x:TypeArguments="local:Agenda">
                                    <mca:CSharpValue x:TypeArguments="local:Agenda" xml:space="preserve">new Agenda()
{
    AgendaID= Guid.Empty,
 CourseID= eEntity.CourseID,
 FromDateTime = _AgendaDTFrom,
 ToDateTime = _AgendaDTTo
}</mca:CSharpValue>
                                  </InArgument>
                                </AddToCollection.Item>
                                <InArgument x:TypeArguments="scg:ICollection(local:Agenda)">
                                  <mca:CSharpValue x:TypeArguments="scg:ICollection(local:Agenda)">eEntity.Agenda</mca:CSharpValue>
                                </InArgument>
                              </AddToCollection>
                            </Sequence>
                          </If.Then>
                        </If>
                      </ActivityAction>
                    </ForEach>
                    <Assign DisplayName="Add One day to variable Loop" sap2010:WorkflowViewState.IdRef="Assign_2">
                      <Assign.To>
                        <OutArgument x:TypeArguments="s:DateTime">
                          <mca:CSharpReference x:TypeArguments="s:DateTime">_Date</mca:CSharpReference>
                        </OutArgument>
                      </Assign.To>
                      <Assign.Value>
                        <InArgument x:TypeArguments="s:DateTime">
                          <mca:CSharpValue x:TypeArguments="s:DateTime">_Date.AddDays(1)</mca:CSharpValue>
                        </InArgument>
                      </Assign.Value>
                    </Assign>
                  </Sequence>
                </DoWhile>
              </FlowStep>
            </FlowStep.Next>
          </FlowStep>
        </FlowStep.Next>
      </FlowStep>
    </Flowchart.StartNode>
    <x:Reference>__ReferenceID0</x:Reference>
    <x:Reference>__ReferenceID1</x:Reference>
    <x:Reference>__ReferenceID2</x:Reference>
    <sads:DebugSymbol.Symbol>d0ZEOlxwZXJzb25hbDFcY29kZVxUQ01Tb3VyY2VDb250cm9sXFRDTVxXb3JrZmxvd3NcQWdlbmRhT25DcmVhdGluZy54YW1sI2ADgQIPAgEBZglmVAMBjgFpDXQWAwGHAXcR9gEbAgECZkdmUQMBjwFxE3FqAwGLAWwTbGADAYgBfBV8bwMBgwF+E/UBHgIBA4MBFY4BHgIBdo8BFegBHwIBEekBFfQBHgIBBIsBG4sBcwIBfYYBG4YBawIBd5IBG5IBlQECAXCZARnmAR4CARLxARvxAWsCAQvsARvsAWgCAQWcAR+cAXgCAROgAR3kASgCARqkAR+vASgCAV+wAR+7ASgCAU68AR/HASgCAT3IAR/TASgCASzUAR/jATECARusASWsAXQCAWinASWnAXYCAWC4ASW4Aa4BAgFXswElswF6AgFPxAElxAFyAgFGvwElvwF2AgE+0AEl0AGrAQIBNcsBJcsBeAIBLeEBI+EBjQECASTXASXdARQCARw=</sads:DebugSymbol.Symbol>
  </Flowchart>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="WriteLine_2" sap:VirtualizedContainerService.HintSize="211,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_3" sap:VirtualizedContainerService.HintSize="494,62" />
      <sap2010:ViewStateData Id="Assign_5" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Assign_4" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Assign_6" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Assign_7" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="AddToCollection`1_1" sap:VirtualizedContainerService.HintSize="242,22" />
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="264,554">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,704" />
      <sap2010:ViewStateData Id="ForEach`1_1" sap:VirtualizedContainerService.HintSize="494,850" />
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="494,62" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="516,1178">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="DoWhile_1" sap:VirtualizedContainerService.HintSize="542,1342">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_3">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">230,384.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_4">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">209,269</av:Point>
            <av:Size x:Key="ShapeSize">242,62</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">330,331 330,384.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_2">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">194.431666666667,137.5</av:Point>
            <av:Size x:Key="ShapeSize">211,62</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">299.931666666667,199.5 299.931666666667,229.5 330,229.5 330,269</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Flowchart_1" sap:VirtualizedContainerService.HintSize="678,636">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <av:Point x:Key="ShapeLocation">270,2.5</av:Point>
            <av:Size x:Key="ShapeSize">60,75</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">300,77.5 300,107.5 299.931666666667,107.5 299.931666666667,137.5</av:PointCollection>
            <x:Double x:Key="Width">664</x:Double>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TCM.Workflows.AgendaOnCreating_1" sap:VirtualizedContainerService.HintSize="718,716">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="ShouldExpandAll">True</x:Boolean>
            <x:Boolean x:Key="ShouldCollapseAll">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>